﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Cintellect.Web.Mvc.Sitemap
{
	public class SitemapProfileElement : ConfigurationElement
	{

		[ConfigurationProperty("changeFrequency", IsRequired = false, DefaultValue = "")]
		public string ChangeFrequency
		{ 
			get { return (string)this["changeFrequency"]; }
			set { this["changeFrequency"] = value; }
		}

		[ConfigurationProperty("ignoreAuthorizeAttribute", IsRequired = false, DefaultValue = false)]
		public bool IgnoreAuthorizeAttribute
		{
			get { return (bool)this["ignoreAuthorizeAttribute"]; }
			set { this["ignoreAuthorizeAttribute"] = value; }
		}

		[ConfigurationProperty("lastModified", IsRequired = false)]
		public DateTime LastModified
		{
			get { return (DateTime)this["lastModified"]; }
			set { this["lastModified"] = value; }
		}

		[ConfigurationProperty("name", IsRequired = true)]
		public string Name
		{
			get { return this["name"] as string; }
		}

		[ConfigurationProperty("priority", IsRequired = false, DefaultValue = 0.5f)]
		public float Priority
		{
			get { return (float)this["priority"]; }
			set { this["priority"] = value; }
		}

		[ConfigurationProperty("queryKey", IsRequired = false, DefaultValue = "")]
		public string QueryKey
		{
			get { return (string)this["queryKey"]; }
			set { this["queryKey"] = value; }
		}

		[ConfigurationProperty("route", IsRequired = false, DefaultValue = "")]
		public string Route
		{
			get { return (string)this["route"]; }
			set { this["route"] = value; }
		}

	}
}
